@import './_themes.scss';
@import "./reset.scss";
@import "../icons/icon.css";

* {
  box-sizing: border-box;
  padding: 0;
  margin: 0;
  -webkit-app-region: no-drag;
}

.themes-warp {
  width: 100%;
  height: 100%;
}

.btn {
  cursor: pointer;

  &:hover {
    opacity: 0.8;
  }
}

.home {
  width: 100%;
  height: 100%;
  background: $color-bg;
  color: $color-font;
  display: flex;
  flex-direction: column;

  .top-warp {
    height: 0px;
    width: 100%;
  }

  .content-warp {
    flex: 1;
    width: 100%;
    position: relative;
    background: $color-dark-bg;
    border-top: solid 1px $color-border;
    border-bottom: solid 1px $color-border;

    .tree-warp {
      background: $color-dark-bg;
      border-right: solid 1px $color-border;
      height: 100%;
      width: 300px;
      position: relative;
      display: flex;
      z-index: 10;
      float: left;
      flex-direction: column;
      overflow: hidden;


      .hb100 {
        height: 100%;
      }

      .ztree-warp {
        padding: 5px 0 0 5px;
      }

      .tree-tools {
        height: 30px;
        width: 100%;
        display: flex;
        align-items: center;
        border-bottom: solid 1px $color-border;
        padding: 0 10px;

        .tools-left {
          min-width: 50px;
        }

        .tools-right {
          flex: 1;
          display: flex;
          flex-direction: row-reverse;

          .btn {
            display: block;
            height: 30px;
            width: 25px;
            line-height: 30px;
            text-align: center;

            &.icon-dingwei {
              font-size: 14px;
            }

            &.icon-collapse {
              font-size: 18px;
            }

            &.icon-shuaxin {
              line-height: 29px;
              font-size: 15px;
            }
          }
        }
      }
    }

    .drag-handle {
      position: absolute;
      left: 300px;
      top: 0px;
      bottom: 0;
      width: 5px;
      z-index: 9;
      //transition: all 200ms;
      cursor: col-resize;
      user-select: none;

      &.active, &:hover {
        background: #0081DB;
      }
    }

    .editor-warp {
      height: 100%;
      float: right;
    }
  }

  .state-warp {
    padding:0 10px;
    height: 30px;
    width: 100%;
    display: flex;
    .state-left{
      flex: 1;
      line-height: 30px;
    }
    .state-right{
      flex: 1;
      display: flex;
      flex-direction: row-reverse;
      line-height: 30px;
    }
  }
}

.edit-warp {
  display: flex;
  height: 100%;
  flex-direction: column;

  .tab-menu-warp{
    width: 100%;
    display: flex;
  }

  .add-btn-warp {
    background: $color-dark-bg;
    cursor: pointer;
    height: 29px;
    line-height: 29px;
    width: 30px;
    text-align: center;

    &:hover {
      background: $color-bg;
    }
  }

  .tab-warp {
    border-bottom: solid 1px $color-border;
    height: 30px;
    width: calc(100% - 30px);
    user-select: none;
    display: flex;
    flex-wrap: nowrap;
    overflow: hidden;;
    white-space: nowrap;

    //.add-btn-warp-zw{
    //  width: 30px;
    //  height: 10px;
    //  background: transparent;
    //  display: inline-block;
    //}



    .tab-item {
      height: 30px;
      line-height: 30px;
      padding: 0 30px 0 10px;
      border-right: solid 1px $color-border;
      position: relative;
      width: auto;
      display: inline-block;
      cursor: pointer;

      &.dragIn {
        background-color: #000000 !important;
        transition: background-color 0.5s;
      }

      &.active {
        border-bottom: none;
        background: $color-bg;
      }

      &:hover {
        .icon-x {
          display: inline;
        }
      }

      .icon-x {
        position: absolute;
        display: none;
        right: 5px;
      }
    }
  }

  .code-editor-warp {
    background: $color-bg;
    flex: 1;
    z-index: 1;
    position: relative;

    .code-editor-item {
      position: absolute;
      left: 0;
      top: 0;
      width: 100%;
      height: 100%;
      opacity: 0;
      z-index: 9;

      &.show {
        opacity: 1;
        z-index: 10;
      }

      .drag-handle{
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
        height: 5px;
        cursor: row-resize;
      }

      .bottom-warp{
        width: 100%;
        height: 200px;
        border-top: solid 1px $color-border;
      }

    }
  }
}
